package com.ygxsk.carhome.response;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Transient;

/*
 * @Author:itchenqi175@163.com
 * @Time:2023-04-13  20:15
 * @Description: 服务站经理的排名，获取保险公司的排名，之中获取保险公司名称
 * 这里暂时仅仅只有一个地方用到；
 */
//@Entity(nameInDb = "SAFETYCOMPANYDB")//防止混淆变动
public class SafetyCompanyInfoBean implements Parcelable {

    //    @Id(autoincrement = true)//主键自动增长
//    @Property(nameInDb = "NUMID")
    Long numId;

    //    @Property(nameInDb = "COMPANYCODE")
    private String companyCode;

    //    @Property(nameInDb = "COMPANYID")
    private transient int companyId;

    //    @Property(nameInDb = "COMPANYNAME")
    private String companyName;

    @Transient
    private transient String createBy;

    @Transient
    private transient String createTime;

    protected SafetyCompanyInfoBean(Parcel in) {
        if (in.readByte() == 0) {
            numId = null;
        } else {
            numId = in.readLong();
        }
        companyCode = in.readString();
        companyName = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        if (numId == null) {
            dest.writeByte((byte) 0);
        } else {
            dest.writeByte((byte) 1);
            dest.writeLong(numId);
        }
        dest.writeString(companyCode);
        dest.writeString(companyName);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<SafetyCompanyInfoBean> CREATOR = new Creator<SafetyCompanyInfoBean>() {
        @Override
        public SafetyCompanyInfoBean createFromParcel(Parcel in) {
            return new SafetyCompanyInfoBean(in);
        }

        @Override
        public SafetyCompanyInfoBean[] newArray(int size) {
            return new SafetyCompanyInfoBean[size];
        }
    };

    public Long getNumId() {
        return numId;
    }

    public void setNumId(Long numId) {
        this.numId = numId;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public int getCompanyId() {
        return companyId;
    }

    public void setCompanyId(int companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
}
